#include <iostream>
#include <vector>

using namespace std;
#include "RBTree.h"

#define N 10000000

void test1()
{
	vector<int> nums(N);
	srand((unsigned int)time(0));

	for (int i = 0; i < N; i++)
	{
		nums[i] = rand() + i;
		//cout << nums[i] << endl;
	}

	RBTree<int> tree;
	for (auto val : nums)
	{
		if (val == 11478)
		{
			int i = 0;
			i++;
		}
		tree.insert(val);
		//cout << val << "->" << tree.isValidRBTree() << endl;
	}
	cout << tree.isValidRBTree() << endl;
}

int main()
{
	test1();

	return 0;
}